<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<x:parse xml="${param.xmlstr}" var="xmlData" />

<script type="text/javascript">
	
	function chooseUploadType(trId,type){
		if(type=="upload"){
			if(!confirm("切换到上传文档模式会清空您输入的文本，是否需要切换")){
				$("#note1 input[name='check']:checked").attr("checked",false);
				$($("#note1 input[name='check']").get(1)).attr("checked",true);
				return;
			}
			$("#prpContent_text").find("textarea").text("");
			
		}
		$("table[id^='"+trId+"']").each(function(){
			if($(this).attr("id")==trId+"_"+type){
				$(this).show();
				
			}
			else{
				$(this).hide();
			}
		});
	}
	
	$(function($) {

		var fileObj = $("#prpContent_upload").find("span[name$='file_name']");
		var fileName = $("#fileNameHid").val();// 获得文件名
		var start = fileName.substring(0, fileName.indexOf("."));// 获得前缀
		var end =fileName.substring(fileName.indexOf(".") + 1,fileName.length);// 获得后缀
		var image = "";
		$("#contentImage").remove();
		if (end.toLowerCase() == "doc" || end.toLowerCase() == "docx") {
			image = "<img id=\"contentImage\" src=\"" + res
					+ "/images/ico_word.gif\">";
		} else if (end.toLowerCase() == "pdf") {
			image = "<img id=\"contentImage\" src=\"" + res
					+ "/images/ico_pdf.gif\">";
		} else if (end.toLowerCase() == "wps") {
			image = "<img id=\"contentImage\" src=\"" + res
					+ "/images/ico_wps.gif\">";
		}
		fileObj.before(image);
		fileObj.html(fileName);
	});
	
</script>


	<table>
		<tr style="display:none">
			<td colspan="3"><b></b><span style="color: red">填写说明：</span>
				您可以选择以下任何一种方式填写正文。
		</tr>
	</table>

	
	<table id="note1">
		<c:set var="fileCode">
			<x:out select="$xmlData/data/content/file_code" />
		</c:set>
		<c:set var="file_txt">
			<x:out select="$xmlData/data/content/file_txt" />
		</c:set>
		<tr style="display:none">
			<td><input type="radio" name="check" <c:if test="${pos_code==''||fileCode!=''||file_txt==''}" >checked</c:if> onclick="chooseUploadType('prpContent','upload')"/>上传文档&nbsp;<input type="radio" name="check" onclick="chooseUploadType('prpContent','text')" <c:if test="${file_txt!=''}" >checked</c:if> />输入文本</td>
		</tr>
		
	</table>

	<table id="prpContent_upload"   <c:if test="${file_txt!=null&&file_txt!=''}" > style="display:none"</c:if>>
		<tr>
			<td>
				 <b><s:text name="proposal.followBelowCompleteApplicationBody" /></b>
			</td>
		</tr>
		<tr>
			<td>
				<c:set var="grant_code"><x:out select="$xmlData/data/proposal/grant_code" /></c:set>
				<c:set var="sub_grant_code"><x:out select="$xmlData/data/proposal/sub_grant_code" /></c:set>
				<s:text name="proposal.downloadApplicationBodyTemplate" />&nbsp;&nbsp;
				<c:choose>
					<c:when test="${sub_grant_code==2500}">
						<!-- 国际(地区)合作与交流项目-NSFC-RGC申请简表 -->
						<a href="${res}/template/content/%E6%AD%A3%E6%96%87%E6%A8%A1%E6%9D%BF%EF%BC%8D%EF%BC%8DRGC%E7%94%B3%E8%AF%B7%E7%AE%80%E8%A1%A8.doc"  class="link_x" ><img alt="" src="${res}/images/ico_word.gif">Word模板</a>&nbsp;&nbsp;
					</c:when>
					<c:when test="${sub_grant_code==434 || sub_grant_code==1696}">
						<!-- 国际(地区)合作与交流项目-合作交流 -->
						<a href="${res}/template/content/%E6%AD%A3%E6%96%87%E6%A8%A1%E6%9D%BF%EF%BC%8D%EF%BC%8D%E5%90%88%E4%BD%9C%E4%BA%A4%E6%B5%81.doc"  class="link_x" ><img alt="" src="${res}/images/ico_word.gif">Word模板</a>&nbsp;&nbsp;
					</c:when>
					<c:when test="${sub_grant_code==476 || sub_grant_code==1711}">
						<!-- 国际(地区)合作与交流项目-出国(境)参加协议双(多)边学术会议 -->
						<a href="${res}/template/content/%E6%AD%A3%E6%96%87%E6%A8%A1%E6%9D%BF%EF%BC%8D%EF%BC%8D%E5%8F%8C%28%E5%A4%9A%29%E8%BE%B9%E5%AD%A6%E6%9C%AF%E4%BC%9A%E8%AE%AE.doc"  class="link_x" ><img alt="" src="${res}/images/ico_word.gif">Word模板</a>&nbsp;&nbsp;
					</c:when>
					<c:when test="${sub_grant_code==513 || sub_grant_code==1810}">
						<!-- 国际(地区)合作与交流项目-在华召开国际(地区)学术会议 -->
						<a href="${res}/template/content/%E6%AD%A3%E6%96%87%E6%A8%A1%E6%9D%BF%EF%BC%8D%EF%BC%8D%E5%9C%A8%E5%8D%8E%E5%8F%AC%E5%BC%80%E5%9B%BD%E9%99%85%28%E5%9C%B0%E5%8C%BA%29%E5%AD%A6%E6%9C%AF%E4%BC%9A%E8%AE%AE.doc"  class="link_x" ><img alt="" src="${res}/images/ico_word.gif">Word模板</a>&nbsp;&nbsp;
					</c:when>
					<c:when test="${sub_grant_code==551}">
						<!-- 国际(地区)合作与交流项目-留学人员短期回国工作讲学 -->
						<a href="${res}/template/content/%E6%AD%A3%E6%96%87%E6%A8%A1%E6%9D%BF%EF%BC%8D%EF%BC%8D%E7%95%99%E5%AD%A6%E4%BA%BA%E5%91%98%E7%9F%AD%E6%9C%9F%E5%9B%9E%E5%9B%BD%E5%B7%A5%E4%BD%9C%E8%AE%B2%E5%AD%A6.doc"  class="link_x" ><img alt="" src="${res}/images/ico_word.gif">Word模板</a>&nbsp;&nbsp;
					</c:when>
					<c:when test="${sub_grant_code==558}">
						<!-- 国际(地区)合作与交流项目-合作研究 -->
						<a href="${res}/template/content/%E6%AD%A3%E6%96%87%E6%A8%A1%E6%9D%BF%EF%BC%8D%EF%BC%8D%E5%90%88%E4%BD%9C%E7%A0%94%E7%A9%B6.doc"  class="link_x" ><img alt="" src="${res}/images/ico_word.gif">Word模板</a>&nbsp;&nbsp;
					</c:when>
					
					
					<c:when test="${sub_grant_code==624}">
						<!-- 联合基金-本地优秀青年人才培养专项 -->
						<a href="${res}/template/content/%E6%AD%A3%E6%96%87%E6%A8%A1%E6%9D%BF%EF%BC%8D%EF%BC%8D%E8%81%94%E5%90%88%E5%9F%BA%E9%87%91-%E6%9C%AC%E5%9C%B0%E4%BC%98%E7%A7%80%E9%9D%92%E5%B9%B4%E4%BA%BA%E6%89%8D%E5%9F%B9%E5%85%BB%E4%B8%93%E9%A1%B9.doc"  class="link_x" ><img alt="" src="${res}/images/ico_word.gif">Word模板</a>&nbsp;&nbsp;
					</c:when>
					<c:when test="${sub_grant_code==626}">
						<!-- 联合基金-培育项目 -->
						<a href="${res}/template/content/%E6%AD%A3%E6%96%87%E6%A8%A1%E6%9D%BF%EF%BC%8D%EF%BC%8D%E8%81%94%E5%90%88%E5%9F%BA%E9%87%91-%E5%9F%B9%E8%82%B2.doc"  class="link_x" ><img alt="" src="${res}/images/ico_word.gif">Word模板</a>&nbsp;&nbsp;
					</c:when>
					<c:when test="${sub_grant_code==628}">
						<!-- 联合基金-重点支持项目 -->
						<a href="${res}/template/content/%E6%AD%A3%E6%96%87%E6%A8%A1%E6%9D%BF%EF%BC%8D%EF%BC%8D%E8%81%94%E5%90%88%E5%9F%BA%E9%87%91-%E9%87%8D%E7%82%B9%E6%94%AF%E6%8C%81.doc"  class="link_x" ><img alt="" src="${res}/images/ico_word.gif">Word模板</a>&nbsp;&nbsp;
					</c:when>
					
					
					<c:when test="${sub_grant_code==2696}">
						<!-- 国家基础科学人才培养基金-科研训练及科研能力提高 -->
						<a href="${res}/template/content/%E6%AD%A3%E6%96%87%E6%A8%A1%E6%9D%BF%EF%BC%8D%EF%BC%8D%E5%9F%BA%E7%A1%80%E4%BA%BA%E6%89%8D%E7%A7%91%E7%A0%94%E8%AE%AD%E7%BB%83.doc"  class="link_x" ><img alt="" src="${res}/images/ico_word.gif">Word模板</a>&nbsp;&nbsp;
					</c:when>
					<c:when test="${sub_grant_code==2695}">
						<!-- 国家基础科学人才培养基金-人才培养支撑条件建设  -->
						<a href="${res}/template/content/%E6%AD%A3%E6%96%87%E6%A8%A1%E6%9D%BF%EF%BC%8D%EF%BC%8D%E5%9F%BA%E7%A1%80%E4%BA%BA%E6%89%8D%E4%BA%BA%E6%89%8D%E5%9F%B9%E5%85%BB%E6%94%AF%E6%92%91.doc"  class="link_x" ><img alt="" src="${res}/images/ico_word.gif">Word模板</a>&nbsp;&nbsp;
					</c:when>
					<c:when test="${sub_grant_code==2697}">
						<!-- 国家基础科学人才培养基金-野外实践能力提高  -->
						<a href="${res}/template/content/%E6%AD%A3%E6%96%87%E6%A8%A1%E6%9D%BF%EF%BC%8D%EF%BC%8D%E5%9F%BA%E7%A1%80%E4%BA%BA%E6%89%8D%E4%BA%BA%E6%89%8D%E5%B8%88%E9%87%8E%E5%A4%96%E5%AE%9E%E8%B7%B5%E8%83%BD%E5%8A%9B.doc"  class="link_x" ><img alt="" src="${res}/images/ico_word.gif">Word模板</a>&nbsp;&nbsp;
					</c:when>
					<c:when test="${sub_grant_code==2698}">
						<!-- 国家基础科学人才培养基金-师资培训  -->
						<a href="${res}/template/content/%E6%AD%A3%E6%96%87%E6%A8%A1%E6%9D%BF%EF%BC%8D%EF%BC%8D%E5%9F%BA%E7%A1%80%E4%BA%BA%E6%89%8D%E4%BA%BA%E6%89%8D%E5%B8%88%E8%B5%84%E5%9F%B9%E8%AE%AD.doc"  class="link_x" ><img alt="" src="${res}/images/ico_word.gif">Word模板</a>&nbsp;&nbsp;
					</c:when>
					<c:when test="${sub_grant_code==638}">
						<!-- 国家基础科学人才培养基金-特殊学科点  -->
						<a href="${res}/template/content/%E6%AD%A3%E6%96%87%E6%A8%A1%E6%9D%BF%EF%BC%8D%EF%BC%8D%E5%9F%BA%E7%A1%80%E4%BA%BA%E6%89%8D%E4%BA%BA%E6%89%8D%E7%89%B9%E6%AE%8A%E5%AD%A6%E7%A7%91%E7%82%B9.doc"  class="link_x" ><img alt="" src="${res}/images/ico_word.gif">Word模板</a>&nbsp;&nbsp;
					</c:when>
					
					<c:when test="${sub_grant_code==633}">
						<!-- 海外及港澳学者-两年期资助项目Word模板  -->
						<a href="${res}/template/content/%E6%AD%A3%E6%96%87%E6%A8%A1%E6%9D%BF%EF%BC%8D%EF%BC%8D%E6%B5%B7%E5%A4%96%E5%8F%8A%E6%B8%AF%E6%BE%B3%E5%AD%A6%E8%80%85%EF%BC%8D%E4%B8%A4%E5%B9%B4%E6%9C%9F.doc"  class="link_x" ><img alt="" src="${res}/images/ico_word.gif">Word模板</a>&nbsp;&nbsp;
					</c:when>
					<c:when test="${sub_grant_code==634}">
						<!-- 海外及港澳学者-延续资助项目Word模板  -->
						<a href="${res}/template/content/%E6%AD%A3%E6%96%87%E6%A8%A1%E6%9D%BF%EF%BC%8D%EF%BC%8D%E6%B5%B7%E5%A4%96%E5%8F%8A%E6%B8%AF%E6%BE%B3%E5%AD%A6%E8%80%85%EF%BC%8D%E5%BB%B6%E7%BB%AD%E8%B5%84%E5%8A%A9.doc"  class="link_x" ><img alt="" src="${res}/images/ico_word.gif">Word模板</a>&nbsp;&nbsp;
					</c:when>
					
					
					<c:when test="${grant_code==222}">
						<!-- 重大项目 -->
						<a href="${res}/template/content/%E6%AD%A3%E6%96%87%E6%A8%A1%E6%9D%BF%EF%BC%8D%EF%BC%8D%E9%87%8D%E5%A4%A7%E9%A1%B9%E7%9B%AE%EF%BC%8D%E9%A1%B9%E7%9B%AE.doc"  class="link_x" ><img alt="" src="${res}/images/ico_word.gif">项目申请Word模板</a>&nbsp;&nbsp;
						<a href="${res}/template/content/%E6%AD%A3%E6%96%87%E6%A8%A1%E6%9D%BF%EF%BC%8D%EF%BC%8D%E9%87%8D%E5%A4%A7%E9%A1%B9%E7%9B%AE%EF%BC%8D%E8%AF%BE%E9%A2%98.doc"  class="link_x" ><img alt="" src="${res}/images/ico_word.gif">课题申请Word模板</a>&nbsp;&nbsp;
					</c:when>
					<c:when test="${grant_code==339}">
						<!-- 重大研究计划  -->
						<a href="${res}/template/content/%E6%AD%A3%E6%96%87%E6%A8%A1%E6%9D%BF%EF%BC%8D%EF%BC%8D%E9%87%8D%E5%A4%A7%E7%A0%94%E7%A9%B6%E8%AE%A1%E5%88%92.doc"  class="link_x" ><img alt="" src="${res}/images/ico_word.gif">Word模板</a>&nbsp;&nbsp;
					</c:when>
					<c:when test="${grant_code==432}">
						<!-- 创新研究群体科学基金  -->
						<a href="${res}/template/content/%E6%AD%A3%E6%96%87%E6%A8%A1%E6%9D%BF%EF%BC%8D%EF%BC%8D%E5%88%9B%E6%96%B0%E7%A0%94%E7%A9%B6%E7%BE%A4%E4%BD%93.doc"  class="link_x" ><img alt="" src="${res}/images/ico_word.gif">Word模板</a>&nbsp;&nbsp;
					</c:when>
					<c:when test="${grant_code==51}">
						<!-- 重大科研仪器设备研制专项  -->
						<a href="${res}/template/content/%E6%AD%A3%E6%96%87%E6%A8%A1%E6%9D%BF%EF%BC%8D%EF%BC%8D%E9%87%8D%E5%A4%A7%E7%A7%91%E7%A0%94%E4%BB%AA%E5%99%A8%E8%AE%BE%E5%A4%87%E7%A0%94%E5%88%B6%E4%B8%93%E9%A1%B9%E7%94%B3%E8%AF%B7%E4%B9%A6.doc"  class="link_x" ><img alt="" src="${res}/images/ico_word.gif">Word模板</a>&nbsp;&nbsp;
					</c:when>
					<c:when test="${grant_code==649}">
						<!-- 专项基金项目  -->
						<a href="${res}/template/content/%E6%AD%A3%E6%96%87%E6%A8%A1%E6%9D%BF%EF%BC%8D%EF%BC%8D%E4%B8%93%E9%A1%B9.doc"  class="link_x" ><img alt="" src="${res}/images/ico_word.gif">Word模板</a>&nbsp;&nbsp;
					</c:when>
					<c:when test="${grant_code==218}">
						<!-- 218面上项目 -->
						
						<!-- 2646青年-面上连续资助项目  -->
						<a id="contentTemp_2646" <c:if test="${sub_grant_code!=2646}">style="display:none;"</c:if> href="${res}/template/content/%e6%ad%a3%e6%96%87%e6%a8%a1%e6%9d%bf%ef%bc%8d%ef%bc%8d%e9%9d%92%e5%b9%b4-%e9%9d%a2%e4%b8%8a%e8%bf%9e%e7%bb%ad%e8%b5%84%e5%8a%a9.doc"  class="link_x" ><img alt="" src="${res}/images/ico_word.gif">Word模板</a>&nbsp;&nbsp;
					</c:when>
					
				</c:choose>
			</td>
		</tr>
		<tr>
			<td>
				<s:text name="proposal.completeApplicationBodyOffline" />
			</td>
		</tr>
		<tr>
			<td>
				<s:text name="proposal.uploadApplicationFile" />
			</td>
		</tr>
		<tr>
			<td>
				<input type="file" name="filedata" />&nbsp;
				<!-- <input type="button" value="上传" name="btnUpload2" class="button_content" onClick="ajaxFileUpload('prpattach','prpContent_upload','DOC,DOCX,WPS');" /> -->
				<input type="hidden" name="content/file_code" value="<x:out select="$xmlData/data/content/file_code" />" />
			</td>
		</tr>
		<tr>
			<td>
				<span class="color_red"><s:text name="proposal.uploadNote" /></span>
			</td>
		</tr>
		<c:set var="file_code"><x:out select="$xmlData/data/content/file_code" /></c:set>
		<tr id="uploadsuccess" <c:if test="${file_code==''}" >style="display:none" </c:if> >
			<td>
				<input type="hidden" id="fileNameHid" value="<x:out select="$xmlData/data/content/file_name" />"/>
				<s:text name="proposal.fileUploaded" /><a id="content_downLoadFile" href="${ctx}/file/ajax-filedownload?fileCode=<x:out select="$xmlData/data/content/file_code" />" class="link_x" ><span name="content/file_name"><x:out select="$xmlData/data/content/file_name" /></span></a>&nbsp;&nbsp;(<s:text name="proposal.uploadDate" /><span name="content/file_date"><x:out select="$xmlData/data/content/file_date" /></span>) <a href="###" class="link_x" onclick="delContent('prpContent_upload')"><s:text name="proposal.deleteUploadFile" /></a>
			</td>
		</tr>
	</table>

	<table id="prpContent_text"  <c:if test="${file_txt==null||file_txt==''}" > style="display:none"</c:if> >
		<tr>
			<td>
			<!--<cpt:helpTips key="prpContent-notes_434" id="help_${grant_code}" ></cpt:helpTips>
-->				
				<c:choose>
				<c:when test="${sub_grant_code=='434'}">
					一、合作研究立论依据<br/>  
					&nbsp;&nbsp;项目的研究意见、科学依据、国内外研究现状分析、合作双方的互补性、 并附主要参考文献及出处<br/>
					二、合作研究内容及合作研究方案 <br/>
						&nbsp;&nbsp;1.研究目标、内容及拟解决的关键问题； <br/>
						&nbsp;&nbsp;2.拟采取的研究方案、技术路线、及可行性分析；<br/>
						&nbsp;&nbsp;3.合作方式、课题设置、研究重点及双方分工； <br/>
					三、合作研究基础<br/>
						&nbsp;&nbsp;1.双方优势、特色所在、与本项目有关的研究工作积累和已取得的研究工作成绩；<br/>
						&nbsp;&nbsp;2.已具备的实验条件，尚缺少的实验条件和拟解决的途径（包括利用其他机构实验条件的计划与落实情况）。<br/>
					四、合作方投入情况（匹配经费、仪器设备、关键技术等）<br/>
					五、合作研究成果共享的约定说明 
				</c:when>
				</c:choose>
			</td>
		</tr>
		
		<tr>
			<td align="left">&nbsp;<textarea cols="80" rows="10" name="content/file_txt" class="input_textarea">${file_txt}</textarea></td>
		</tr>
	</table>